﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.MESUI.Login.A_Public.Model
{
    /// <summary>
    /// 通用API响应模型
    /// </summary>
    public class ApiResponse<T>
    {
        public int code { get; set; }
        public string message { get; set; }
        public T resultData { get; set; }
        public bool Success => code == 200;
    }

    /// <summary>
    /// 分页响应模型
    /// </summary>
    public class PagedResponse<T>
    {
        public int totalCount { get; set; }
        public int totalPage { get; set; }
        public List<T> pageDatas { get; set; }
        public int code { get; set; }
        public string message { get; set; }
        public object resultData { get; set; }
        public bool Success => code == 200;
    }

    /// <summary>
    /// 编码规则请求模型
    /// </summary>
    public class CodeRuleRequest
    {
        public string ruleName { get; set; }
        public string prefix { get; set; }
        public string connector { get; set; }
        public int serialLength { get; set; }
    }
}
